{extend name="index/index" /}

{block name="mycss"}
<link rel="stylesheet" href="__CSS__zyUpload.css" type="text/css">
{/block}

{block name="name"}
<div class="col-md-3"></div>
<div class="index_note col-md-6">
    <div class="container">
        <div class="row">
            <ul class="nav nav-pills">
                <li role="presentation" class="active" id="article"><a href="#">文章</a></li>
                <li role="presentation" id="imgs"><a href="#">图片</a></li>
                <li role="presentation" id="video"><a href="#">视频</a></li>
            </ul>
            <div style="width: 700px;margin-top:30px; ">
            <!--文章-->
                <div class="article-from" style="">
                    <form  action="{:url('index/Note/TextCreate')}" onsubmit="return articlefrom()" enctype="multipart/form-data" method="post" class="form-horizontal">
                        <input type="hidden" name="type" value="0">
                        <div class="form-group">
                            <label for="inputEmail3" class="col-sm-2 control-label">标签 : </label>
                            <div class="col-sm-10" class="interesting">
                                <select name="interesting" class="form-control article-inert">
                                    {volist name='data' id='v'}
                                    <option  value="{$v['id']}">{$v['tag_name']}</option>
                                    {/volist}
                                </select>
                            </div>
                        </div>
                        <div class="form-group">
                            <label for="inputEmail3" class="col-sm-2 control-label">标题 : </label>
                            <div class="col-sm-10">
                                <input type="text" class="form-control article-title" id="note2" name="title" maxlength="50" value="" onkeyup="this.value=this.value.substring(0, 50)" placeholder="最多可输入50字" >
                                <span id="text-count2" value="">0</span>/50
                            </div>
                        </div>
                        <div class="form-group">
                            <label for="inputPassword3" class="col-sm-2 control-label">文章 :</label>
                            <div class="col-sm-10">
                                <textarea cols="40" rows="7" id="note" name="content" class="form-control article-content" maxlength="200" value="" onkeyup="this.value=this.value.substring(0, 200)" placeholder="最多可输入200字"></textarea>
                                <span id="text-count" value="">0</span>/200
                            </div>
                        </div>

                        <div class="form-group">
                            <label for="inputPassword3" class="col-sm-2 control-label">上传封面图 :</label>
                            <div class="col-sm-10">
                                <label for="files"><img src="__IMG__addUpload.png" draggable="false" id="Upload_photo" width="50px"></label>
                                <input type="file" accept="image/png,image/gif,image/jpg,image/jpeg" class="article-imgs" id="files" name="image" multiple  onchange="oneImg()" style="display: none"/>
                                <div id="preview"></div>
                                <p>最多只能添加一张图片</p>
                            </div>
                        </div>
                        <div class="form-group">
                            <div class="col-sm-offset-2 col-sm-10">
                                <button type="submit" id="sent" class="btn btn-info">提交</button>
                            </div>
                            <div class="from-error" style="color: #ff000"></div>
                        </div>
                    </form>
            </div>
                <div class="clearfix"></div>

            <!--图片 -->
                <div class="imgs-from" style="display: none">
                    <form   action="{:url('index/Note/ImgsCreate')}" onsubmit="return articlefrom2()" enctype="multipart/form-data" method="post" class="form-horizontal">
                        <input type="hidden" name="type" value="1">
                        <div class="form-group">
                            <label  class="col-sm-2 control-label">标签 : </label>
                            <div class="col-sm-10" class="interesting">
                                <select name="interesting"  class="form-control article-inert2">
                                    {volist name='data' id='v'}
                                    <option  value="{$v['id']}">{$v['tag_name']}</option>
                                    {/volist}
                                </select>
                            </div>
                        </div>
                        <div class="form-group">
                            <label class="col-sm-2 control-label">标题 : </label>
                            <div class="col-sm-10">
                                <input type="text" class="form-control article-title2" id="note4" name="title" maxlength="50" value="" onkeyup="this.value=this.value.substring(0, 50)" placeholder="最多可输入50字" >
                                <span id="text-count4" value="">0</span>/50
                            </div>
                        </div>
                        <div class="form-group">
                            <label  class="col-sm-2 control-label">文章 :</label>
                            <div class="col-sm-10">
                                <textarea cols="40" rows="7" id="note3" name="content" class="form-control article-content2" maxlength="200" value="" onkeyup="this.value=this.value.substring(0, 200)" placeholder="最多可输入200字"></textarea>
                                <span id="text-count3" value="">0</span>/200
                            </div>
                        </div>

                        <div class="form-group">
                            <label class="col-sm-2 control-label">上传封面图 :</label>
                            <div class="col-sm-10">

                                <label for="files2"><img src="__IMG__addUpload.png" draggable="false" id="Upload_photo2" width="50px"></label>
                                <input type="file" accept="image/png,image/gif,image/jpg,image/jpeg" class="article-imgs2" id="files2" name="image"   onchange="twoImg()" style="display: none"/>
                                <div id="preview2"></div>
                                <p>最多只能添加一张图片</p>
                            </div>
                        </div>
                        <div class="form-group">
                            <label  class="col-sm-2 control-label">上传配图 :</label>
                            <div class="col-sm-10">
                                <label for="mull"><img src="__IMG__up.png" draggable="false"  width="50px"></label>
                                <input type="file" accept="image/png,image/gif,image/jpg,image/jpeg" id="mull" class="mullname" multiple name="imgs[]" onchange="pictures()" style="display: none"/>
                                <div id="mul-imgs"></div>
                                <p>最多可以添加十张图片,请一次性提交</p>
                                <!--<input type="file" name="imgs[]" id="mull" class="mullname" multiple="multiple">-->
                            </div>
                        </div>
                        <div class="form-group">
                            <div class="col-sm-offset-2 col-sm-10">
                                <button type="submit" class="btn btn-info">提交</button>
                            </div>
                        </div>
                    </form>
            </div>

                <div class="clearfix"></div>
            <!--视频-->
            <div class="video-from" style="display: none">  <!--  -->
                <form action="{:url('index/Note/VideoCreate')}" onsubmit="return articlefrom3()" enctype="multipart/form-data" method="post" class="form-horizontal">
                    <input type="hidden" name="type" value="2">
                    <div class="form-group">
                        <label  class="col-sm-2 control-label">标签 : </label>
                        <div class="col-sm-10" class="interesting">
                            <select name="interesting"  class="form-control article-inert3">
                                {volist name='data' id='v'}
                                <option  value="{$v['id']}">{$v['tag_name']}</option>
                                {/volist}
                            </select>
                        </div>
                    </div>
                    <div class="form-group">
                        <label class="col-sm-2 control-label">标题 : </label>
                        <div class="col-sm-10">
                            <input type="text" class="form-control article-title3" id="note6" name="title" maxlength="50" value="" onkeyup="this.value=this.value.substring(0, 50)" placeholder="最多可输入50字" >
                            <span id="text-count6" value="">0</span>/50
                        </div>
                    </div>
                    <div class="form-group">
                        <label  class="col-sm-2 control-label">文章 :</label>
                        <div class="col-sm-10">
                            <textarea cols="40" rows="7" id="note5" name="content" class="form-control article-content3" maxlength="200" value="" onkeyup="this.value=this.value.substring(0, 200)" placeholder="最多可输入200字"></textarea>
                            <span id="text-count5" value="">0</span>/200
                        </div>
                    </div>
                    <div class="form-group">
                        <label class="col-sm-2 control-label">上传封面图 :</label>
                        <div class="col-sm-10">

                            <label for="files3"><img src="__IMG__addUpload.png" draggable="false" id="Upload_photo3" width="50px"></label>
                            <input type="file" accept="image/png,image/gif,image/jpg,image/jpeg" class="article-imgs3" id="files3" name="image" multiple  onchange="threeImg()" style="display: none"/>
                            <div id="preview3"></div>
                            <p>最多只能添加一张图片</p>
                        </div>
                    </div>
                    <div class="form-group">
                        <label  class="col-sm-2 control-label">上传视频</label>
                        <div class="col-sm-10">
                            <label for="files-video"><img src="__IMG__multiple.png" draggable="false"  width="50px"></label>
                            <input type="file" id="files-video" onchange="upvideo()" name="video" accept="video/mp4" class="article-video" style="display: none">
                            <div id="upvideo"></div>
                        </div>
                    </div>
                    <div class="form-group">
                        <div class="col-sm-offset-2 col-sm-10">
                            <button type="submit" class="btn btn-info">提交</button>
                        </div>
                    </div>
                </form>
            </div>
            </div>
        </div>
    </div>
</div>
<div class="clearfix"></div>
{/block}


{block name="script"}
<script src="__JS__note-create.js"></script>
{/block}
